package com.mgface.framework.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project ms-ribbon
 * @create 2017-04-10 17:32
 * @desc http://192.168.1.101:8010/hystrix.stream 访问hystrix的状态
 **/
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
public class RibbonHystrixApplication {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

    public static void main(String[] args) {
        SpringApplication.run(RibbonHystrixApplication.class,args);
    }
}
